<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
    <style>
        .top-panel {
            border: 1px solid #eceff9;
            border-radius: 5px;
            text-align: center;
        }

        .top-panel > .layui-card-body {
            height: 60px;
        }
    </style>
</head>
<body>
<div class="layuimini-main">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-xs12 layui-col-md12">
            <fieldset class="table-search-fieldset">
                <div id="Earnings_trend" style="background-color:#ffffff;min-height:500px;padding: 10px"></div>
            </fieldset>
        </div>
    </div>


</div>
<!--</div>-->
{include file="public/footer" /}
<script>
    layui.use(['layer', 'echarts',], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            echarts = layui.echarts;

        /*每日新增统计*/
        var Earnings_trend = echarts.init(document.getElementById('Earnings_trend'), 'walden');
        var option_Earnings_trend = {
            title: {
                text: '恢复材料使用情况分析',
                textStyle: {
                    color: 'red',
                },
                padding: [0, 0, 10, 100]  // 位置
            },
            legend: {},
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'shadow'
                }
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                containLabel: true
            },
            dataZoom: [{
                type: 'slider',
                startValue: "{$startTime}",
                endValue: "{$endTime}",
            }, {
                type: 'inside',
                startValue: "{$startTime}",
                endValue: "{$endTime}",
            }],
            toolbox: {
                feature: {
                    saveAsImage: {}
                }
            },
            xAxis: {
                type: 'category',
                data: [{$dailyTime}]
            },
            yAxis: {
                type: 'value',
            },
            series: [
                {
                    name: '用量',
                    type: 'line',
                    data: [{$dailyData}],
                },
            ]
        };
        Earnings_trend.setOption(option_Earnings_trend);

        // echarts 窗口缩放自适应
        window.onresize = function () {
            Earnings_trend.resize();
        }

    });
</script>
</body>
</html>
